package com.andaily.service.impl;

import com.andaily.domain.thing.handler.AutoStartThingHandler;
import com.andaily.infrastructure.support.LogHelper;
import com.andaily.service.SchedulerService;

/**
 * Date: 13-7-17
 *
 * @author Shengzhao Li
 */
public class SchedulerServiceImpl implements SchedulerService {

    private static LogHelper log = LogHelper.create(SchedulerServiceImpl.class);

    /**
     * Send mail to user for Thing setting notify  ;
     * Only handle the Thing that have startTime value
     * <p/>
     * Execute on every day 5:00
     */
    @Override
    public void notifyThingStartAction() {
        log.info("Start to execute notifyThingStartAction scheduler...");
        AutoStartThingHandler autoStartThingHandler = new AutoStartThingHandler();
        autoStartThingHandler.handle();
    }
}
